<template>
  <div>
    <el-card class="announcement-container">
      <div slot="header" class="announcement-header">
        {{ announcement.info.announcement_title }}
      </div>
      <div class="announcement-content">{{ announcement.content }}</div>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {},
  components: {},
  data() {
    return {
      announcement: {}
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    // 获取公告详情
    this.$nextTick(() => {
      this.getAnnouncement()
    })
  },
  methods: {
    // 获取公告详情
    async getAnnouncement() {
      const aid = this.$route.params.id
      console.log(aid)
      const res = await this.$API.announcement.getAnnounceMent(aid)
      console.log('announce', res)
      if (res.status == 200) {
        this.announcement = res.data
      }
    }
  }
}
</script>

<style scoped>
.announcement-container {
  min-height: 85vh;
  padding: 20px;
}
.announcement-header {
  font-size: 24px;
  font-weight: 500;
  text-align: center;
}
.announcement-content {
  line-height: 1.5em;
}
</style>
